﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="ImageStyle" TargetType="{x:Type Image}">
        <Setter Property="StretchDirection" Value="DownOnly"/>
        <Setter Property="Width" Value="14" />
        <Setter Property="Height" Value="14" />
    </Style>

    <Style x:Key="AccountImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\account.png" />
    </Style>

    <Style x:Key="ArrowRefreshImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\arrow_refresh.png"/>
    </Style>

    <Style x:Key="ArrowReplyImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\arrow_reply.png"/>
    </Style>

    <Style x:Key="ArrowReTweetImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\retweet.png"/>
    </Style>

    <Style x:Key="HomeImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\home.png"/>
    </Style>

    <Style x:Key="SettingImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\setting.png"/>
    </Style>

    <Style x:Key="SearchImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\search.png"/>
    </Style>

    <Style x:Key="NewImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\new.png"/>
    </Style>

    <Style x:Key="NetworkImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\network.png"/>
    </Style>

    <Style x:Key="ProtectImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\protect.png"/>
    </Style>

    <Style x:Key="HeartImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\heart.png"/>
    </Style>

    <Style x:Key="FavoriteImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\star_empty.png"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding Path=Favorited}" Value="True">
                <Setter Property="Source" Value=".\Images\star.png"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="CrossImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\cross.png"/>
    </Style>

	<!--
	edited by yuki.
	
	original
    <Style x:Key="PopupImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\popup.png"/>
    </Style>
	-->

	<Style x:Key="PopupImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
		<Setter Property="Source" Value=".\Images\popup.png"/>
		<Style.Triggers>
			<DataTrigger Binding="{Binding Path=TmpOffPopup}" Value="True">
				<Setter Property="Source" Value=".\Images\popup_ng.png"/>
			</DataTrigger>
		</Style.Triggers>
	</Style>

	<Style x:Key="TwitFormImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
		<Setter Property="Source" Value=".\Images\pencil.png"/>
	</Style>

	<!--end of editing by yuki.-->

	<Style x:Key="DesignImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\design.png"/>
    </Style>

    <Style x:Key="KeyboardImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\keyboard.png"/>
    </Style>

    <Style x:Key="LogImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\log.png"/>
    </Style>

    <Style x:Key="AddInImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\addin.png"/>
    </Style>

    <Style x:Key="SoundImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\sound.png"/>
    </Style>

    <Style x:Key="KeywordImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\keyword.png"/>
    </Style>

    <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="WindowForegroundBrush" Color="#FF000000"/>
    <SolidColorBrush x:Key="WindowBorderBrush" Color="#FFA0A0A0"/>
    <SolidColorBrush x:Key="PopupBorderBrush" Color="#FF2793B7"/>
    <SolidColorBrush x:Key="GrayTextBrush" Color="#FF808080"/>
    
    <SolidColorBrush x:Key="BalloonBackgroundBrush" Color="#FFFFFFAF"/>

    <Style x:Key="{x:Type Hyperlink}" TargetType="{x:Type Hyperlink}">
        <Setter Property="TextDecorations" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="Blue"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="TextDecorations" Value="Underline"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="BorderBrush" Value="{StaticResource WindowBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Border Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" Padding="1">
                        <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="False">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </ScrollViewer>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="True">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding" Value="2,0,0,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="Gray" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBox}">
        <Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}"/>
    </Style>

    <Style x:Key="{x:Type PasswordBox}" TargetType="{x:Type PasswordBox}">
        <Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}"/>
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamilyKey}}"/>
    </Style>

    <Style x:Key="{x:Type TabControl}" TargetType="{x:Type TabControl}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Padding" Value="4,4,4,4"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource WindowBorderBrush}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="true" ClipToBounds="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="0"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel x:Name="HeaderPanel" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" Grid.Column="0" Grid.Row="0" Margin="2,2,2,0" IsItemsHost="true" HorizontalAlignment="Center"/>
                        <Border x:Name="ContentPanel" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" Grid.Column="0" Grid.Row="1">
                            <ContentPresenter x:Name="PART_SelectedContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" ContentSource="SelectedContent"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type TabItem}" TargetType="{x:Type TabItem}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Foreground" Value="{StaticResource WindowForegroundBrush}"/>
        <Setter Property="Padding" Value="6,1,6,1"/>
        <Setter Property="Background" Value="LightGray"/>
        <Setter Property="BorderBrush" Value="{StaticResource WindowBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1,1,1,0"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid SnapsToDevicePixels="true">
                        <Border Name="Bd" Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter Name="Content" ContentSource="Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" VerticalAlignment="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Panel.ZIndex" Value="1"/>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource WindowBackgroundBrush}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="false"/>
                                <Condition Property="IsMouseOver" Value="true"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="Gray"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true"/>
                                <Condition Property="TabStripPlacement" Value="Top"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin" Value="0,0,0,-1"/>
                            <Setter TargetName="Content" Property="Margin" Value="0,0,0,1"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type Window}" TargetType="{x:Type Window}">
        <Setter Property="Background" Value="{StaticResource WindowBackgroundBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource WindowForegroundBrush}"/>
        <Setter Property="FontSize" Value="11" />
    </Style>

    <Style x:Key="MainWindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource {x:Type Window}}" />

    <Style x:Key="HeaderTextBlockStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="FontWeight" Value="Bold"/>
    </Style>

    <Style x:Key="CounterTextBlockStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontFamily" Value="Georgia"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Foreground" Value="Gray"/>
    </Style>

    <Style x:Key="TweetTextBoxStyle" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
        <Setter Property="Height" Value="35" />
    </Style>

    <Style x:Key="ImageButtonBaseStyle" TargetType="{x:Type ButtonBase}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <ContentPresenter Name="Presenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" RenderTransformOrigin="0.5,0.5"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="RenderTransform" TargetName="Presenter">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ImageButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource ImageButtonBaseStyle}"/>

    <Style x:Key="ImageToggleButtonStyle" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ImageButtonBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ContentPresenter Name="Presenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" RenderTransformOrigin="0.5,0.5"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="RenderTransform" TargetName="Presenter">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="RenderTransform" TargetName="Presenter">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="UpdateButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="Gray"/>
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Width" Value="80" />
        <Setter Property="Height" Value="20" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border SnapsToDevicePixels="True" Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <ContentPresenter Name="Presenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="BorderThickness" Value="2"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="RenderTransform" TargetName="Presenter">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TimelineTabControlStyle" TargetType="{x:Type TabControl}" BasedOn="{StaticResource {x:Type TabControl}}">
        <Setter Property="Padding" Value="0"/>
    </Style>

    <Style x:Key="TimelineTabItemStyle" TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
        <Setter Property="MinWidth" Value="60"/>
        <Setter Property="Padding" Value="0,0.5,0,0.5"/>
        <Setter Property="ContextMenu" Value="{StaticResource TimelineContextMenu}"/>
    </Style>

    <Style x:Key="TimelineListBoxStyle" TargetType="{x:Type ListBox}" BasedOn="{StaticResource {x:Type ListBox}}">
        <Setter Property="Margin" Value="0"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Grid.IsSharedSizeScope" Value="True"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Visible"/>
    </Style>

    <Style x:Key="TimelineListBoxItemStyle" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
        <Setter Property="ContextMenu" Value="{StaticResource StatusContextMenu}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                            <Setter TargetName="Bd" Property="Background" Value="#FFDFEFFF"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="Bd" Property="Background" Value="#FFFFBFBF"/>
                        </Trigger>
                        <DataTrigger Binding="{Binding Path=IsMessage}" Value="True">
                            <Setter Property="ContextMenu" Value="{StaticResource MessageContextMenu}"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="{x:Type StatusBar}" TargetType="{x:Type StatusBar}" BasedOn="{StaticResource {x:Type StatusBar}}">
        <Setter Property="FontSize" Value="11" />
    </Style>

    <Style x:Key="SettingDialogStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource {x:Type Window}}"/>

    <Style x:Key="CategoryListBoxStyle" TargetType="{x:Type ListBox}" BasedOn="{StaticResource {x:Type ListBox}}"/>

    <Style x:Key="CategoryListBoxItemStyle" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Padding" Value="5,2,2,2"/>
    </Style>

    <Style x:Key="PopupWindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource {x:Type Window}}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="WindowStyle" Value="None"/>
        <Setter Property="BorderBrush" Value="{StaticResource PopupBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1,0,1,1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Window}">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid Background="{TemplateBinding Background}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Border Grid.Row="0" Background="{StaticResource PopupBorderBrush}" BorderThickness="0" Padding="1">
                                <Grid>
                                    <TextBlock Margin="5,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Center"
                                               FontWeight="Bold" Foreground="White" Text="{TemplateBinding Title}"/>
                                    <Button Grid.Row="0" Margin="0,0,3,0" VerticalAlignment="Center" HorizontalAlignment="Right"
                                            Command="ApplicationCommands.Close" Style="{StaticResource ImageButtonStyle}">
                                        <Image Width="14" Height="14" Style="{StaticResource CrossImageStyle}"/>
                                    </Button>
                                </Grid>
                            </Border>
                            <AdornerDecorator Grid.Row="1">
                                <ContentPresenter/>
                            </AdornerDecorator>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="PopupListBoxStyle" TargetType="{x:Type ListBox}" BasedOn="{StaticResource TimelineListBoxStyle}">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    </Style>

    <Style x:Key="PopupListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding" Value="2,0,0,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                            <Setter Property="Background" Value="#FFDFEFFF"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="UpdateWindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource PopupWindowStyle}"/>

</ResourceDictionary>